package com.jike.jkgame.db;

import android.database.sqlite.SQLiteDatabase;

public class TreasuresTable {
	public static final String TABLE_NAME = "treasures";
	private static final String CREATE_TABLE = "create table " + TABLE_NAME
			+ " (_id  integer primary key autoincrement, id integer, name text, descript text, "
			+ "max_attack_addon_min integer, max_attack_addon_max integer, min_attack_addon_min integer, min_attack_addon_max integer, "
			+ "max_defense_addon_min integer, max_defense_addon_max integer, min_defense_addon_min integer, min_defense_addon_max integer, "
			+ "max_attack_probability_min integer, max_attack_probability_max integer, max_defense_probability_min integer, max_defense_probability_max integer, "
			+ "needed_fragments text);";
	
	public static void onCreate(SQLiteDatabase db) {
		db.execSQL(CREATE_TABLE);
	}

	public static void onUpgrade(SQLiteDatabase db, int oldVersion,
			int newVersion) {
		db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
		onCreate(db);
	}
}
